﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using Touch2Like.DAL;
using Touch2Like.Model;
using System.Data;
using System.Collections;
using OpenFlashChart;

namespace Touch2Like.Web.Customer.Manage
{
    public partial class Comment : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
            {
                DateTime startDate = Convert.ToDateTime(Server.UrlDecode(Request["start"]));
                DateTime endDate = Convert.ToDateTime(Server.UrlDecode(Request["end"]));
                AnswerDAL answer = new AnswerDAL();
                DataTable dtAnswer = answer.GetListByQuestionID(Convert.ToInt32(Request["questionid"]), WebUtility.UserGUID, startDate, endDate.AddDays(1));

                dtAnswer.DefaultView.RowFilter = "Answer is not null AND Answer<>''";
                dtAnswer = dtAnswer.DefaultView.ToTable();
                Repeater_Comment.DataSource = dtAnswer;
                Repeater_Comment.DataBind();
            }
        }
    }
}